Crate winter_utils

source ·
Expand description

This crate contains utility traits, functions, and macros used by other crates of Winterfell STARK prover and verifier.

Modules

  • Feature-based re-export of common collection components.
  • Components needed for parallel iterators.
  • Feature-based re-export of common string components.

Macros

  • Applies a procedure to the provided slice either in a single thread or multiple threads based on whether concurrent feature is enabled.
  • Returns either a regular or a parallel iterator depending on whether concurrent feature is enabled.
  • Returns either a regular or a parallel mutable iterator depending on whether concurrent feature is enabled.

Structs

  • A pointer type that uniquely owns a heap allocation of type T.
  • Implements ByteReader trait for a slice of bytes.

Enums

Traits

  • Defines a zero-copy representation of Self as a sequence of bytes.
  • Defines how primitive values are to be read from Self.
  • Defines how primitive values are to be written into Self.
  • Defines how to deserialize Self from bytes.
  • Defines how Self can be read from a sequence of random bytes.
  • Defines how to serialize Self into bytes.

Functions

  • Transmutes a slice of n arrays each of length N, into a slice of N * n elements.
  • Transmutes a vector of n arrays each of length N, into a vector of N * n elements.
  • Transmutes a slice of n elements into a slice of n / N elements, each of which is an array of N elements.
  • Transmutes a vector of n elements into a vector of n / N elements, each of which is an array of N elements.
  • Transposes a slice of n elements into a matrix with N columns and n/N rows.
  • Returns a vector of the specified length with un-initialized memory.